from pydantic import BaseModel, Field
from typing import Dict, Any, Optional


class ErrorResponse(BaseModel):
    success: bool = Field(False, description="请求是否成功")
    error: str = Field(..., description="错误类型")
    message: str = Field(..., description="错误消息")
    detail: Optional[str] = Field(None, description="详细错误信息")


class StatisticsResponse(BaseModel):
    success: bool = Field(..., description="请求是否成功")
    statistics: Dict[str, Any] = Field(..., description="统计信息")


